﻿using UnityEngine;
using System.Collections;

public class Powerup : MonoBehaviour {

	public PlayerController player;
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnCollisionEnter2D(Collision2D other) {
		if(other.gameObject.GetComponent<PlayerController>() != null ) {
			player.maxHealth+=10;
			Destroy(gameObject);
		}
	}
}
